Hi, I want to sort all objects that "Object text" has changed since a date D. I've done that by reading the history and verifying the changed attribute, but that does'nt turn. As if there is was a problem in the for h in current Object do loop.
bool fSkip_Increment(Skip upd_skpList, string KeyValue)
{
bool IsNewValue = false
int NumReferences = 0
if(find(upd_skpList, KeyValue, NumReferences))
delete(upd_skpList, KeyValue)
else IsNewValue = true
NumReferences++
put (upd_skpList, KeyValue, NumReferences)
return(IsNewValue)
} // end fSkip_Increment()
Object o
int count
Skip compte_user = createString () // création de la skip list
int iNbEditeurs = 0
string sNomEditeur
for o in all m do{
History h
for h in current Object do {
HistoryType ht = h.type
string exigence = o."AS Exigence"
string sEditepar = o."Last Modified By"
print h.attrName "\n"
if (exigence == "TRUE"){
if (ht==modifyObject){
if(h.attrName != "AS Suivi"){
fSkip_Increment (compte_user, sEditepar)
}
}
}
}
}
for count in compte_user do{
sEditepar = (string key compte_user)
print count "\t" sEditepar "\n"
}
Estebell - Wed Jul 23 10:53:40 EDT 2014 |
Re: filtering history This looks very familiar.
-Louie Nice initial function ;)
|
Re: filtering history llandale - Wed Jul 23 15:44:09 EDT 2014 This looks very familiar.
-Louie Nice initial function ;)
By following your advice, the code does not enter into the History loop...
Object o
int count
Skip compte_user = createString ()
int iNbEditeurs = 0
string sNomEditeur
for o in all m do{
History h
print "toto\n"
string exigence = o."AS Exigence"
string sEditepar = o."Last Modified By"
if (exigence == "TRUE"){
for h in o do {
HistoryType ht = h.type
if (ht==modifyObject){
if(h.attrName != "AS Suivi"){
fSkip_Increment (compte_user, sEditepar)
}
}
}
}
}
for count in compte_user do{
sEditepar = (string key compte_user)
print count "\t" sEditepar "\n"
}
|
Re: filtering history Estebell - Thu Jul 24 04:01:06 EDT 2014 By following your advice, the code does not enter into the History loop...
Object o
int count
Skip compte_user = createString ()
int iNbEditeurs = 0
string sNomEditeur
for o in all m do{
History h
print "toto\n"
string exigence = o."AS Exigence"
string sEditepar = o."Last Modified By"
if (exigence == "TRUE"){
for h in o do {
HistoryType ht = h.type
if (ht==modifyObject){
if(h.attrName != "AS Suivi"){
fSkip_Increment (compte_user, sEditepar)
}
}
}
}
}
for count in compte_user do{
sEditepar = (string key compte_user)
print count "\t" sEditepar "\n"
}
I tried your code on my DOORS and after adding Module m = current and changing the attribute names you are trying to access the program enters the "for h in o" without any problems. Have you verified that "AS Exigence" returns a value of "TRUE"? Maybe add some more print calls to see where exactly the program stops running. |
Re: filtering history O.Wilkop - Thu Jul 24 05:17:00 EDT 2014 I tried your code on my DOORS and after adding Module m = current and changing the attribute names you are trying to access the program enters the "for h in o" without any problems. Have you verified that "AS Exigence" returns a value of "TRUE"? Maybe add some more print calls to see where exactly the program stops running. Yes, add this before your "TRUE" if.
I bet it's "true" or "True". -Louie |